<template>
  <div class="app-container" style="padding: 0">
    <div style="height: 3vw;background-color: #F0F2F5;padding: 1vw 0 0 2vw" @click="Cancel">
      <i class="el-icon-back" style="width: 1.5vw"></i>&nbsp;返回
    </div>
    <div>
      <div class="xinxi">
        <div>反馈人姓名：{{ T12.f1202 }}</div>
        <div>联系电话：{{ T12.f0604 }}</div>
        <div>所属公司：{{ T12.f0302 }}</div>
        <div>反馈上传时间：{{ T12.f1204 }}</div>
      </div>
      <hr style="color: #00afff">
      <div style="padding: 1.5vw 1.5vw 1.5vw 6vw">
        <div style="width: 50vw; display: flex">
          <div style="min-width: 6vw">
            反馈信息：
          </div>
          <div style="white-space: pre-wrap;min-width: 52vw;">
            {{this.T12.f1203}}
          </div>
        </div>
        <div style="width: 50vw; display: flex; margin: 2vw 0 0 0">
          <div style="min-width: 6vw">回复信息：</div>
          <div style="min-width: 52vw">
            <el-input type="textarea"
              :rows="8"
              placeholder="请输入内容"
              v-model="T12.f1207">
            </el-input>
          </div>
        </div>
      </div>
    </div>
    <div style="margin: 0 0 0 30vw">
      <el-row>
        <el-button @click="Cancel">取消</el-button>
        <el-button type="primary" style="margin: 0 0 0 5vw" @click="update">回复</el-button>
      </el-row>
    </div>
  </div>
</template>

<script>
import { getT12} from "@/api/T12/T12";
import Request from '@/utils/request'
export default {
  name: "T09",
  data() {
    return {
      T12: {},
      ids:[this.$route.params.id]
    }
  },
  created() {
    this.getT12ByF1201();
  },
  methods: {
    getT12ByF1201() {
      getT12(this.$route.params.id).then(response => {
        console.log(response.data);
        this.T12 = response.data;
      });
    },
    update(){
      Request.put('/T12/T12/bulkResponses',
        {f1201s:this.ids,f1207:this.T12.f1207}).then(response => {
        this.$modal.msgSuccess("回复成功");
        this.$router.push({ name: 'T12'});
      })
    },
    Cancel(){
      this.$router.push({ name: 'T12'});
    }
  }
};
</script>

<style scoped>
 {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.xinxi {
  display: flex;
  flex-wrap: wrap;
  padding: 1.5vw 1.5vw 1.5vw 6vw;
}
.xinxi div{
  margin: 0 4vw -1vw 0;
}

</style>
